<div class="form-inline">
    <div class="row">
        <div class="form-group col-12 col-sm-6">
            <Select @bind-Value="@DataPrimaryId" DisplayText="主键参数" ShowLabel="true">
                <Options>
                    <SelectOption Text="1" Value="1"></SelectOption>
                    <SelectOption Text="2" Value="2"></SelectOption>
                    <SelectOption Text="3" Value="3"></SelectOption>
                    <SelectOption Text="4" Value="4"></SelectOption>
                    <SelectOption Text="5" Value="5"></SelectOption>
                    <SelectOption Text="6" Value="6"></SelectOption>
                    <SelectOption Text="7" Value="7"></SelectOption>
                    <SelectOption Text="8" Value="8"></SelectOption>
                    <SelectOption Text="9" Value="9"></SelectOption>
                    <SelectOption Text="10" Value="10"></SelectOption>
                </Options>
            </Select>
        </div>
        <div class="form-group col-12 col-sm-6">
            <Button @onclick="@OnClickShowDataById">弹窗</Button>
        </div>
    </div>
</div>

@code {
    private int DataPrimaryId { get; set; }

    private Task OnClickShowDataById()
    {
        DialogService?.Show(new DialogOption()
        {
            Title = "数据查询窗口",
            BodyContext = DataPrimaryId,
            BodyTemplate = builder =>
            {
                var index = 0;
                builder.OpenComponent<DataDialogComponent>(index++);
                builder.CloseComponent();
            }
        });
        return Task.CompletedTask;
    }
}

// 组件示例代码请查看 https://gitee.com/LongbowEnterprise/BootstrapBlazor/blob/dev/src/BootstrapBlazor.Shared/Pages/Components/DataDialogComponent.razor